#include<signal.h>
#include<stdio.h>

static volatile int n = 0;
void screen_changed()
{	
	printf("changed %d\n", ++n);
}

int main(void)
{
	signal(SIGWINCH, screen_changed);
	for(;;) {
		sleep(10);
	}
	return 0;
}
